package obj;

import com.google.common.collect.Maps;

import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;

/**
 * Created by dell on 2015/4/12.
 */
public class NService implements INumberService {

    @Override
    public int GetNextNumber(int[] nums) {
//        try {
//            TimeUnit.SECONDS.sleep(3);
//        } catch (InterruptedException e) {
//            e.printStackTrace();
//        }
        System.out.println(nums[0]);
        return nums[0];
    }

    public void setNextNumber(int num) {
        System.out.println(num);
    }

    @Override
    public void setNumber(int num) {
        System.out.println(++num);
    }

    @Override
    public Map getIt(int num) {
        try {
            TimeUnit.SECONDS.sleep(3);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return Maps.newTreeMap();
    }

    @Override
    public List getItL(int num) {
        return null;
    }

    @Override
    public TestResult getObject(int i) {
        return new TestResult(i, "0.1", new T1(i, "one"));
    }

}
